#!/usr/bin/python
# -*- coding: utf-8 -*-
"""unit test for encrypt
"""

import unittest

from encrypt import *

class EncryptTest(unittest.TestCase):
    
    def test_caesar_encrypt(self):
        self.assertEqual(caesar_encrypt('a'), 'b')
        self.assertEqual(caesar_encrypt('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'),
                         'bcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZa')
        self.assertEqual(caesar_encrypt('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 5),
                         'fghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcde')
        self.assertEqual(caesar_encrypt('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 26),
                         'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')
        self.assertEqual(caesar_encrypt('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 52),
                         'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
        self.assertEqual(caesar_encrypt('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 53),
                         'bcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZa')
        print caesar_decrypt(caesar_encrypt('net4 guys, Congratulations!! You\'re right.'))
        print caesar_encrypt('er, Happy birthday! Yours, feng.')
        print caesar_decrypt(caesar_encrypt('er, Happy birthday! Yours, feng.'))
        
        print caesar_decrypt('i je wq yu wftc')
        
        print caesar_encrypt(caesar_decrypt('er, Happy birthday! Yours, feng.'))
        
#        for i in range(26):
#            print caesar_encrypt(caesar_encrypt('i love you'.upper(), i), i)
if __name__ == '__main__':
    unittest.main()